<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%  
    request.setCharacterEncoding("utf-8") ;         // 按中文接收  
    String openid = request.getAttribute("openid").toString() ;     // 接收表单参数  
      // 接收表单参数  
    String organids = request.getAttribute("organids").toString() ;   
    
	%> 
	<head>
		<meta charset="utf-8">
		<title>精护部位</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="http://47.93.241.8/shouba2.0/sb/sbwx/css/mui.min.css">
		<link rel="stylesheet" href="http://47.93.241.8/shouba2.0/sb/sbwx/pro_css/index.css"/>
		<link href="http://47.93.241.8/shouba2.0/sb/icons/icon.css" rel="stylesheet" type="text/css">
		<link href="http://47.93.241.8/shouba2.0/sb/themes/insdep/easyui.css" rel="stylesheet" type="text/css">
		<link href="http://47.93.241.8/shouba2.0/sb/css/demo.css" rel="stylesheet" type="text/css" />
		<link href="http://47.93.241.8/shouba2.0/sb/themes/insdep/master.css" rel="stylesheet" type="text/css" />
		<link href="http://47.93.241.8/shouba2.0/sb/themes/insdep/easyui_animation.css" rel="stylesheet" type="text/css">
		<link href="http://47.93.241.8/shouba2.0/sb/themes/insdep/easyui_plus.css" rel="stylesheet" type="text/css">
		<link href="http://47.93.241.8/shouba2.0/sb/themes/insdep/insdep_theme_default.css" rel="stylesheet" type="text/css">
		<link href="http://47.93.241.8/shouba2.0/sb/themes/insdep/icon.css" rel="stylesheet" type="text/css">
		
		<!--标准mui.css-->
		<!-- <link rel="stylesheet" href="css/mui.min.css"> -->
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="http://47.93.241.8/shouba2.0/sb/sbwx/css/app.css" />
		<link rel="stylesheet" type="text/css" href="http://47.93.241.8/shouba2.0/sb/sbwx/pro_css/registration.css" />
		<link rel="stylesheet" type="text/css" href="http://47.93.241.8/shouba2.0/sb/sbwx/pro_css/parts.css" />
		<style>
			.mui-table h4,
			.mui-table h5,
			.mui-table .mui-h5,
			.mui-table .mui-h6,
			.mui-table p {
				margin-top: 0;
			}
			
			.mui-table h4 {
				line-height: 21px;
				font-weight: 500;
			}
			
			.mui-table .oa-icon {
				position: absolute;
				right: 0;
				bottom: 0;
			}
			
			.mui-table .oa-icon-star-filled {
				color: #f14e41;
			}
			
			.mui-bar {
				background: #ff954e;
			}
			
			.mui-title {
				color: #fff;
			}
			
			.mui-icon-back:before,
			.mui-icon-left-nav:before {
				color: #fff;
			}
			
			.mui-col-xs-2 {
				width: 100%;
			}
			
			.mui-table-cell p {
				font-size: 0.2em;
				text-align: left;
				margin-left: 10%;
				/*vertical-align: middle;*/
			}
			
			input[type=color],
			input[type=date],
			input[type=datetime-local],
			input[type=datetime],
			input[type=email],
			input[type=month],
			input[type=number],
			input[type=password],
			input[type=search],
			input[type=tel],
			input[type=text],
			input[type=time],
			input[type=url],
			input[type=week],
			select,
			textarea {
				width: 60%;
			}
			
			input[type=color],
			input[type=date],
			input[type=datetime-local],
			input[type=datetime],
			input[type=email],
			input[type=month],
			input[type=number],
			input[type=password],
			input[type=search],
			input[type=tel],
			input[type=text],
			input[type=time],
			input[type=url],
			input[type=week],
			select,
			textarea {
				border: none;
				background: none;
			}
			
			.mui-btn,
			button,
			input[type=button],
			input[type=reset],
			input[type=submit] {
				border-radius: 50px;
				background: #FF954E;
				border: 1px solid #FF954E;
				color: #fff;
				font-family: "微软雅黑";
			}
			
			.mui-table-view-cell {
				margin-top: 10px;
				padding: 11px 0;
			}
			
			.mui-btn,
			button,
			input[type=button],
			input[type=reset],
			input[type=submit] {
				border-radius: 5px;
				width: 95%;
				margin-top: 15px;
				margin-bottom: 15px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">瘦吧</h1>
		</header>
		<div class="mui-content">
			<!-- <div>
				<div class="font_style fl" style="line-height: 48px;">刘娜娜</div>
				<button type="button" style="width: 25%;margin: 8px;" class="fr">保存</button>
			</div> -->
			<div class="cl"></div>
			<div class="allwidth">
				<div style="padding-top: 1px;">
					<div class="mt_15">
						<div class="fl box">
							<p class="fl">能量膏</p>
							<div class="fr">
								<select id="yt"  style="width: 200px;">
									<option value="1">1</option>
									<option value="0">0</option>
								</select>
							
						</div>
						<div class="cl"></div>
					</div>
					<div class="cl"></div>
					<div class="fl box mt_10">
						<p class="fl">手法</p>
						<div class="fr">
							<select id="sfuser" name="sfuser" style="width: 200px;" reg='{"required":"true"}'>
							</select>
						</div>
						<div class="cl"></div>
					</div>
					<div class="cl"></div>
				</div>
				<div style="padding-top: 1px;">
					<div class="mt_15">
						<div class="fl box1">
							<p>精护部位</p>
							<div>
								<div>
									<p class="fl">腰部</p>
									<select id="ybuser" name="ybuser" style="width: 200px;" reg='{"required":"true"}'>
									</select>
								</div>
								<div class="cl"></div>
								<div>
									<p class="fl">大腿</p>
									<select id="dtuser" name="dtuser" style="width: 200px;" reg='{"required":"true"}'>
									</select>
									<!-- <p><img src="img/xz.png" class="fr"></p> -->
								</div>
								<div class="cl"></div>
								<div>
									<p class="fl">小腿</p>
									<select id="xtuser" name="xtuser" style="width: 200px;" reg='{"required":"true"}'>
									</select>
									<!-- <p><img src="img/xz1.png" class="fr"></p> -->
								</div>
								<div class="cl"></div>
								<div>
									<p class="fl">胳膊</p>
									<select id="gbuser" name="gbuser" style="width: 200px;" reg='{"required":"true"}'>
									</select>
									<!-- <p><img src="img/xz.png" class="fr"></p> -->
								</div>
								
								<div>
									<p class="fl">验证码</p>
					 		<input type="text" id  = "yzm" style="width: 200px;" placeholder="请询问店员验证码" />
								</div>
								<div class="cl"></div>
							</div>
						</div>
						<div class="cl"></div>
						<!-- <div class="fl box2 mt_15">
							<p>产品剩余量</p>
							<div>
								<div>
									<p class="fl">精油</p>
									<p class="fr">总共50次，剩余<span>25.3</span>次</p>
								</div>
								<div class="cl"></div>
								<div>
									<p class="fl">按摩膏</p>
									<p class="fr">总共50次，剩余<span>25.3</span>次</p>
								</div>
								<div class="cl"></div>
							</div>
						</div> -->
					</div>
					<div class="cl"></div>
				</div>
				<button type="button" style="padding: 10px 0;" onclick="save()">结束服务</button>
			</div>
		</div>
	</body>
	<script src="http://47.93.241.8/shouba2.0/sb/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://47.93.241.8/shouba2.0/sb/js/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://47.93.241.8/shouba2.0/sb/js/jquery.insdep-extend.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://47.93.241.8/shouba2.0/sb/js/demo.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://47.93.241.8/shouba2.0/sb/js/ajax2.js" type="text/javascript" charset="utf-8"></script>
		
		<!-- start: ztree -->
		<link rel="stylesheet" type="text/css" href="http://47.93.241.8/shouba2.0/sb/plugins/ztree/css/metroStyle/metroStyle.css">
		<!-- end: ztree -->

		<!-- ztree -->
		<script type="text/javascript" src="http://47.93.241.8/shouba2.0/sb/plugins/ztree/js/jquery.ztree.core.min.js"></script>
		<script type="text/javascript" src="http://47.93.241.8/shouba2.0/sb/plugins/ztree/js/jquery.ztree.excheck.min.js"></script>
		<script type="text/javascript" src="http://47.93.241.8/shouba2.0/sb/plugins/ztree/js/jquery.ztree.exedit.min.js"></script>
		
		<!-- easy -->
		<script type="text/javascript" src="http://47.93.241.8/shouba2.0/sb/js/easy/easy.js"></script>
		
		<script type="text/javascript" src="http://47.93.241.8/shouba2.0/sb/js/template.js"></script>
		
		<script type="text/javascript" src="http://47.93.241.8/shouba2.0/sb/js/common.js"></script>
		
		<!-- eova -->
		<script type="text/javascript" src="http://47.93.241.8/shouba2.0/sb/plugins/eova/eova.js"></script>
		
		<link href="http://47.93.241.8/shouba2.0/sb/plugins/msgbox/msgbox.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="http://47.93.241.8/shouba2.0/sb/plugins/msgbox/msgbox.js"></script> 
	<script src="http://47.93.241.8/shouba2.0/sb/sbwx/js/mui.min.js"></script>
	<script>
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});
		
		    $(function() {   
		       
		                queryUser();
		         

		    });

		// 数据库查询下拉内容
		    function queryUser() {
			
		    	var organids = "<%=organids%>";
		        $("#sfuser").append('<option value="">' + "请选择" + '</option>');
		        $("#gbuser").append('<option value="">' + "请选择" + '</option>');
		        $("#ybuser").append('<option value="">' + "请选择" + '</option>');
		        $("#dtuser").append('<option value="">' + "请选择" + '</option>');
		        $("#xtuser").append('<option value="">' + "请选择" + '</option>');
		        var url='/shouba2.0/wxBeingServed/queryUser';
				var data={"organids":organids};
				//var result = common_ajax.ajaxFunc(url, data);
				$.post(url,data,function(date){
					
					 $.each(date.user,function(key,values){
		                    $("#sfuser").append('<option value="'+ key +'">' + values + '</option>');
		                    $("#ybuser").append('<option value="'+ key +'">' + values + '</option>');
		                    $("#dtuser").append('<option value="'+ key +'">' + values + '</option>');
		                    $("#xtuser").append('<option value="'+ key +'">' + values + '</option>');
		                    $("#gbuser").append('<option value="'+ key +'">' + values + '</option>');
		                });
				})
		       
		    };
		   
		    //实时跟新下拉列表选项 ：先清除option   .html(""); 再重新查询
		    function unbind() {

		          $("#sfuser").html("");
		          $("#gbuser").html("");
		          $("#ybuser").html("");
		          $("#dtuser").html("");
		          $("#xtuser").html("");
		           queryUser();

		    };

		   
	function  save(){
			
			var openid = "<%=openid%>";
			var organids = "<%=organids%>";
			var yt = document.getElementById("yt").value;
			var sfuser = document.getElementById("sfuser").value;
			var ybuser = document.getElementById("ybuser").value;
			var dtuser = document.getElementById("dtuser").value;
			var xtuser = document.getElementById("xtuser").value;
			var gbuser = document.getElementById("gbuser").value;
			var yzm=document.getElementById("yzm").value;
			if(yzm==null||yzm==''){
				$.alert(parent.$, "验证码不能为空!");
				return false;
			}
			if(organids!= "")
			{	
	                var url='/shouba2.0/wxBeingServed/updateSer';
					var data={"openid":openid,"organids":organids,"yt":yt,"sfuser":sfuser,"ybuser":ybuser,"gbuser":gbuser,"dtuser":dtuser,"xtuser":xtuser,"yzm":yzm};
					//var result = common_ajax.ajaxFunc(url, data);
					$.post(url,data,function(date){
						if(date != "200"){
							
							$.alert(parent.$, date);
						}else{
							$.slideMsg("保存成功", parent.$);
							
						}
						
						
					})
					
				
			}else
			{
				 $.alert(parent.$, "请先绑定顾客");
			}
			 
		}
	</script>
</html>